package trading.algo;

import java.util.TimerTask;
import java.util.concurrent.ScheduledThreadPoolExecutor;

public class ThreadPoolShutdownTask extends TimerTask {
    
    private ScheduledThreadPoolExecutor threadPoolExecutor;
    
    public ThreadPoolShutdownTask(ScheduledThreadPoolExecutor threadPoolExecutor) {
        this.threadPoolExecutor = threadPoolExecutor;
    }

    @Override
    public void run() {
        this.threadPoolExecutor.shutdown();
    }

}
